import React from 'react'
import { connect } from 'react-redux';
import { renderRoutes } from 'react-router-config';
import { actionCreators } from '../../pages/Main/store';
// import Tabbar from './Tabbar'

function Tabbar(props) {
    return (
        <>tabbar</>
    )
}

const Bottom = (props) => {
    const { route } = props;
    return (
        <>
            {renderRoutes(route.routes)}
            {/* tabbar */}
            <Tabbar />
        </>
    )
}

const mapStateToProps = function(state) {
    return state
}
const mapDispatchToProps = function(dispatch) {
    return {
        setIndexDispatch(index) {
            dispatch(actionCreators.setIndex(index))
        }
    }
}

export default connect(mapStateToProps,mapDispatchToProps)(Bottom)